<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/platform/include/include.jsp" %>
<html>
<head>
    <TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}"/></TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <%@ include file="/jsp/platform/include/header.jsp" %>

</HEAD>
<BODY>
<DIV class="all">
    <%@ include file="/jsp/platform/include/head.jsp" %>
    <%@ include file="/jsp/platform/include/menu.jsp" %>
    <DIV class="mains">
        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
            <TBODY>
            <TR valign="top">
                <%@ include file="/jsp/platform/include/mainLeft.jsp" %>
                <TD>
                    <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
                        <TBODY>
                        <TR>
                            <TD>
                                <TABLE width="180" border="0" cellspacing="0" cellpadding="0">
                                    <TBODY>
                                    <TR>
                                        <TD width="7"><IMG width="7" height="36" alt=""
                                                           src="<%=request.getContextPath()%>/images/pages_l.jpg">
                                        </TD>
                                        <TD align="center"
                                            background="<%=request.getContextPath()%>/images/pages_bg.jpg">
															<SPAN class="f_tit1">代理商转让
														</SPAN></TD>
                                        <TD width="7"><IMG width="7" height="36" alt=""
                                                           src="<%=request.getContextPath()%>/images/pages_r.jpg">
                                        </TD>
                                    </TR>
                                    </TBODY>
                                </TABLE>
                            </TD>
                        </TR>
                        </TBODY>
                        <TR>
                            <TD>
                                <div class="pages_con">
                                        <div class="pages_con_20">
                                            <div class="transaction_external">
                                                <DIV class="clearfix">
                                                    <SPAN class="fund-item">
                                                        <SPAN class="label dl_w" style="padding-left:20px;text-align:right; width:110px">待转出代理账户：</SPAN>
                                                                  <INPUT id="fromAccount" name="fromAccount"
                                                                         class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
                                                                         type="text" maxlength="30"/>

                                                        <SPAN class="fund-item">
                                                            <SPAN class="label dl_w" style="padding-left:20px;text-align:right; width:110px">接收代理账户：</SPAN>
																  <INPUT id="toAccount" name="toAccount"
                                                                         class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
                                                                         type="text" maxlength="30"/>

                                                        <SPAN class="fund-item"> <A class="btn confirm margin_l_10" onClick="javaScript:transAgent();"
                                                                                        href="javascript:void(0);">转让</A> </SPAN>
                                                </DIV>
                                            </DIV>
                                            <br>
                                        </div>
                                </div> <!--当中内容块结束--></TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            </TBODY>
        </TABLE>
    </DIV>
    <%@ include file="/jsp/platform/include/foot.jsp" %>
        <script type="text/javascript">

            function transAgent() {
                debugger;
                var fromAccount = $("#fromAccount").val();

                if (!checkMobile(fromAccount)) {
                    showMessage('待转让账户不合法');
                    return;
                }
                var toAccount = $("#toAccount").val();
                if (!checkMobile(toAccount)) {
                    showMessage('接收账户不合法');
                    return;
                }

                $.messager.confirm("操作提示", "您确定要转让吗！", function (data) {
                    if (data) {
                        var url = URL_BASE + '/manage/agentInfo/transAgent';
                        var dataParam = {
                            'fromAccount': fromAccount,
                            'toAccount': toAccount
                        };

                        $.ajax({
                            type: "post",
                            url: url,
                            data: dataParam,
                            success: function (data) {
                                showMessage(data.msg);
                            },
                            error: function (data) {
                                // 请求出错处理
                                showNetErrorMessage("");
                            }
                        });

                    }
                }) ;
            }
        </script>
</BODY>
</HTML>
